CC=g++
CPPFLAGS=-g -Wall -fPIC
LDFLAGS=-lpthread
LIB=polimr
OBJS=$(LIB).o Partitioner.o IntermBuffer.o ResultBuffer.o Mapper.o Reducer.o

default: $(LIB).so

$(LIB).so: $(OBJS)
	g++ -fPIC -shared $(OBJS) -o lib$(LIB).so

$(LIB).o: $(LIB).cpp $(LIB).hpp $(LIB).h

Partitioner.o: Partitioner.cpp Partitioner.hpp

IntermBuffer.o: IntermBuffer.cpp IntermBuffer.hpp

ResultBuffer.o: ResultBuffer.cpp ResultBuffer.hpp

Mapper.o: Mapper.cpp Mapper.hpp

Reducer.o: Reducer.cpp Reducer.hpp

clean:
	rm -f ./*~ ./*.o
	rm -f ./lib$(LIB).so 
